<?php $this->load->view("v-index/v-sidebar-home") ?>
<div class="container content">
        <div class="row">
     
            <ul class="mnu-block-product">
            
            <?php 
				 
			foreach($menutop as $rows)
					{
						$id=$rows['id'];
						$name=$rows['name'];	
						$parent=$rows['parent'];
						if($parent==$id_menu)
							{
								echo' <li class="dropdown"><a href="'.base_url("home").'/sanpham/'.$id_menu.'/1/'.$rows['id'].'">'.$name.'<b class="caret"></b></a>
										  <ul class="mnu-block-lv2">
											';
											$id2=$id;
											foreach($menutop as $rows)
											{
												$id=$rows['id'];
												$name=$rows['name'];	
												$parent=$rows['parent'];
												if($id2==$parent)
												{
													echo'<li><a href="'.base_url("home").'/sanpham/'.$id_menu.'/2/'.$rows['id'].'">'.$name.'</a></li>';
												}												
											}
								echo'
										  </ul>
										</li>
										';
							}
					}			
			?>
               <?php 
			   		
					//var_dump($randitem);
			   ?>
             
            </ul>
         </div>  
             
        <div class="col-xs-12 right-content">
            <div class="row">
            <?php 
					foreach($data as $rows)
					{
						$id=$rows['id_product'];
						$ten=$rows['name'];
						$gia=$rows['price'];
						if($id!="")
						{
							echo'
							 <div class="col-xs-4 mar-lr-10" style="background: #fff;">
								<div class="item-product">
									<a href="'.base_url("home").'/chitiet/'.$id.'">
									<img src="'.base_url("public").'/images/product/mga_prt/min_1_'.$id.'.jpg" class="img-product2" alt="'.$ten.'">
									</a>
									<div class="caption">
										<h4>'.$ten.'</h4>                             
											<div class="col-xs-5 pad-l-0">'.number_format($gia).' VNĐ</div>
											<div class="col-xs-6  text-center">
											<a id="" href="#" title="'.$ten.'" class="btn-buy"></a>
											</div>
										<div class="clear"></div>
									</div>
								</div>
							</div>
							';
						}
						
					}
				
				
				
			?>
            	
                <div style="clear:both"></div>
                <div align="center">
						<?php 
                        if(isset($links))
                    	{
                        echo $links;
                    	} 
						?>
                </div>
                
            </div>
        </div><!--end right content-->
    </div>
    <!--end container-->
      <!--
              
    			-->